<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>内容页</title>
	<link rel="stylesheet" href="css/jd_list_item.css" />
	<link rel="stylesheet" href="css/jd_item.css" />
	<link rel="stylesheet" href="font/css/font-awesome-ie7.min.css" />
	<link rel="stylesheet" href="font/css/font-awesome.min.css" />
	<link rel="stylesheet" href="css/navig.css" />
	<link rel="stylesheet" href="css/sclright.css" />
	<link rel="stylesheet" href="css/jd_main_right_life.css" />
	<script type="text/javascript" src="Public/org/jquery.min.js"></script>
	<script type="text/javascript" src="js/jd_topad.js" ></script>
	<script type="text/javascript" src="js/jd_item.js" ></script>
	<script type="text/javascript" src="js/jd_mainleft.js"></script>
	<script type="text/javascript" src="js/jd_ sclrt.js"></script>
</head>
<body>
	<!-- 顶部导航区域开始  -->
	<div id="topad">
		<div class="center">

			<ul style="float:right;width:auto;">
				<?php if (isset($_SESSION['user_id'])): ?>
					<li class="a"><a class="hello" href="<?php echo U('Member/User/myInfo') ?>"><?php echo $_SESSION['username'] ?></a><a class="login" href="<?php echo U('Member/User/quit') ?>">退出</a><span class="line"></span></li>
				<?php else: ?>
					<li class="a"><a class="hello" href="<?php echo U('Member/User/login') ?>">你好，请登录</a><a class="login" href="<?php echo U('Member/User/register') ?>">免费注册</a><span class="line"></span></li>
				<?php endif ?>

				<li><a href="<?php echo U('Member/Index/order') ?>">我的订单</a><span class="line"></span></li>
				<li class="a side"><a href="<?php echo U('Member/Index/myInfo') ?>">我的京东</a>

				</li>

			</ul>
		</div>
	</div>
	<!-- 顶部导航区域结束 -->

	<!-- 搜索区域开始-->
	<div id="search">
		<img src="images/logo-201305.jpg" height="60" width="270" alt="" class="jd" />
		<form action="" class="search">
			<input class="text" type="text"  value="金龙鱼" />
			<input type="submit" class="submit" value="搜索" />
		</form>

		<div class="shopcar">
			<div class="over">
				<img src="images/sleep.png" height="49" width="57" alt="" />
				<p>购物车中还没有商品，赶紧选购吧！</p>
			</div>
			<div class="include">
				<span class="car"></span>
				<a href="<?php echo U('Home/Index/goShopCart',array('goods_id'=>17)) ?>">我的购物车</a>
				<span class="arrow">〉</span>
				<!-- <span class="logo">0</span> -->
			</div>
		</div>
	</div>
	<!-- 搜索区域结束-->
	<!-- 导航条开始 -->
	<div id="gps">
		<div id="main">
			<a href="<?php echo U('lists',array('cat_id'=>18)) ?>" class="class" >全部商品分类</a>

		</div>
		<a href="<?php echo U('lists',array('cat_id'=>18)) ?>" class="gps a">服装城</a>
		<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>' class="img" ><img src="images/aiyou.jpg" height="44" width="140" alt="" /></a>
	</div>
	<!-- 导航条结束 -->
	<!-- 红色区条 -->
	<div id="red"></div>
	<!-- 红色区条结束 -->
	<!-- 主区域开始 -->
	<div id="item_content">
		<div class="auto_middle">
			<div class="nav_item">
				<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>' class="first" style="font-size: 18px;font-weight:bold;padding:0 5px;"> 衣服 </a>
				<span class="icon-angle-right"></span>
				<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>' class="second"> 女装 </a>
				<span class="icon-angle-right"></span>
				<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>' class="third"> 上衣 </a>
				<span class="icon-angle-right"></span>
				<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>' class="fouth"> 针织衫 </a>
				<span class="icon-angle-right"></span>
				<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>' class="fifth"> 针织衫1 </a>
			</div>
			<div class="item_detail">
				<div class="scorll_pic">
					<div id="spec-list">
						<div id="left_pic">
							<img src="<?php echo $pic['midd_pic'] ?>" alt="">
							<div id="box_pic"></div>
							<div id="cover_pic"></div>
						</div>
						<ul class="lh">
							<li>
								<img src="<?php echo $pic['small_pic'] ?>" width="50" height="50">
							</li>
						 </ul>
					</div>
					<div id="right_pic">
						<img src="<?php echo $pic['big_pic'] ?>" height="800" width="800" alt="" id="rpic_pic" />
					</div>
				</div>
				<div class="details">
					<h3 class="title">
						<?php echo $good['goods_name'] ?>
					</h3>
					<div class="price">
						<span class="price_word">京 东 价：</span>
						<sapn class="price_token">￥</sapn>
						<span class="price_num" id="jdprice"><?php echo $good['shop_price'] ?></span>
					</div>
					<div class="good_detail" id="good_indent">

						<?php foreach ($attrs as $key => $value): ?>
							<dl class="color">
								<dt attrid='<?php echo $v['attr_id'] ?>'><?php echo $value[0]['attr_name'] ?>：</dt>
								<dd>
									<?php foreach ($value as $k => $v): ?>
										<a href="javascript:check()" goodattrid='<?php echo $v['good_attr_id'] ?>' class="">
											<span>
												<?php echo $v['attr_values'] ?>
											</span>
										</a>
									<?php endforeach ?>
								</dd>
							</dl>
						<?php endforeach ?>
					</div>
					<script type="text/javascript">
						$(function(){

							$('#good_indent dl dd a').click(function() {
								$(this).addClass('active').siblings('a').removeClass('active');
							});

							$('#good_indent dl dd').each(function(index, el) {
								$(this).find('a').eq(0).addClass('active');
							});
							check();

						})

						function check()
						{
							var goodattrid = '';

							$('#good_indent dl dd a.active').each(function() {

								goodattrid += $(this).attr('goodattrid')+"-";

							});
							goodattrid = goodattrid.slice(0,-1);
							// alert(goodattrid)
							$.post('<?php echo U("Home/Index/addPrice") ?>', {goodattrid: goodattrid}, function(da) {
								var price = <?php echo $good['shop_price'] ?>*1+da*1;
								$("#jdprice").html(price);
								// alert(da)
							});


							var houdun = 1;
							$('#good_indent').find('dl').each(function(index, el) {
								if(!$(this).find('dd a').hasClass('active')){
									houdun=0;
								}
							});

							if(houdun==1){
								var data = '';
								$('#good_indent').find('dl').each(function(index, el) {

									data+=$(this).find('.active').attr('goodattrid')+'_';

								});
								data = data.slice(0, -1);
								$.post('<?php echo U("Home/Index/checkStore") ?>', {data: data,goods_id:<?php echo $good['goods_id'] ?>}, function(data) {
									$('#storeNum').html(data)
								});
							}

						}


						function cart()
						{

							var buynum = $('#buy-num').val();


							var houdun = 1;
							$('#good_indent').find('dl').each(function(index, el) {
								if(!$(this).find('dd a').hasClass('active')){
									houdun=0;
								}
							});

							if(houdun==1){
								var data = '';
								$('#good_indent').find('dl').each(function(index, el) {

									data+=$(this).find('.active').attr('goodattrid')+'_';

								});
								data = data.slice(0, -1);

								location.href = '<?php echo U("Home/Index/shopcar") ?>&good_id='+<?php echo $good['goods_id'] ?>+'&data='+data+'&buynum='+buynum;
							}

						}
					</script>

					<div class="store">
						<label>库存数量 : <span id="storeNum">0</span></label>
					</div>
					<div class="buy">
						<div class="choose-amount fl " id="changenum">
							<input class="text" id="buy-num" value="1" onblur="setAmount();">
							<a class="btn-add" href="javascript:jia();">+</a>
							<a class="btn-reduce" href="javascript:jian();">-</a>
						</div>
						<script type="text/javascript">
							function setAmount()
							{
								var storeNum = $('#storeNum').html()*1;
								var input = $('#buy-num');
								var num = input.val();
								if (num >= storeNum) {
									num = storeNum;
								}
								if (num <= 1) {
									num = 1;
								}
								input.val(num);

							}
							function jia() {

								var storeNum = $('#storeNum').html()*1;
								var input = $('#buy-num');
								var num = input.val() * 1 + 1;

								if (num >= storeNum) {
									num = storeNum;
								}

								input.val(num);

							}

							function jian() {
								var input = $('#buy-num');
								var num = input.val() * 1 - 1;
								if (num <= 1) {
									num = 1;
								}
								input.val(num);

							}


						</script>
						<div class="shopcar" id="choose-btn-append">
							<a class="btn-append" onclick="cart()" id="InitCartUrl" href="javascript:void(0)"><b class="icon-shopping-cart"></b> 加入购物车</a>
						</div>
						<!-- <div class="choose" id="choose-btn-gift">
							<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>' class="btn-gift">轻松购</a>
						</div> -->
					</div>
				</div>
			</div>
		</div>
	</div>

	<!-- 主区域结束 -->
	<!-- 商品介绍 -->
	<div id="good_introduce">
		<div class="info_good">
			<div class="left">
				<div class="class">
					<h3 class="related_class">
						相关分类
					</h3>
					<div class="item">
						<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>手机</a>
						<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>对讲机</a>
					</div>
				</div>
				<div class="brand">
					<h3 class="related_brand">
						同类其他品牌
					</h3>
					<ul class="icon">
						<li>
							<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>小米（MI）</a>
						</li>
						<li>
							<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>小米（MI）</a>
						</li>
						<li>
							<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>小米（MI）</a>
						</li>
						<li>
							<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>小米（MI）</a>
						</li>
						<li>
							<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>小米（MI）</a>
						</li>
						<li>
							<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>小米（MI）</a>
						</li>
						<li>
							<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>小米（MI）</a>
						</li>
						<li>
							<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>小米（MI）</a>
						</li>
						<li>
							<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>小米（MI）</a>
						</li>
						<li>
							<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>小米（MI）</a>
						</li>
					</ul>
				</div>
				<div class="mobile_rank">
					<h3 class="related_brand">
						手机排行榜
					</h3>
					<ul class="icon">
						<li>
							<span class="num">1</span>
							<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>' class="img">
								<img src="image/phone/mobile.jpg">
							</a>
							<a class="iphone_good">AppleiPhone 6</a>
							<label for="" class="price">￥<sapn>4688.00</sapn></label>
						</li>
						<li>
							<span class="num">1</span>
							<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>' class="img">
								<img src="image/phone/mobile.jpg">
							</a>
							<a class="iphone_good">AppleiPhone 6</a>
							<label for="" class="price">￥<sapn>4688.00</sapn></label>
						</li>
						<li>
							<span class="num">1</span>
							<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>' class="img">
								<img src="image/phone/mobile.jpg">
							</a>
							<a class="iphone_good">AppleiPhone 6</a>
							<label for="" class="price">￥<sapn>4688.00</sapn></label>
						</li>
						<li>
							<span class="num">1</span>
							<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>' class="img">
								<img src="image/phone/mobile.jpg">
							</a>
							<a class="iphone_good">AppleiPhone 6</a>
							<label for="" class="price">￥<sapn>4688.00</sapn></label>
						</li>
					</ul>
				</div>
			</div>
			<div class="right">
				<div class="configation">
					<h3 class="title">
						商品介绍
					</h3>
					<ul class="iphone_detail">
						<li class="desc">
							<ul id="parameter2" class="p-parameter-list">
								<li>商品名称： <?php echo $good['goods_name'] ?></li>
								<li>商品编号： <?php echo $good['goods_sn'] ?></li>
								<li>
									品牌：<a href=''><?php echo $good['name'] ?></a>
								</li>
								<li>上架时间： <?php echo date('Y-m-d',$good['create_at']) ?> </li>
							</ul>
						</li>
					</ul>
					<p class="more-par">
						<a href="#product-detail" class="J-more-param">更多参数&gt;&gt;</a>
						<p>
						</div>
						<div class="comment">
							<h3 class="comment_title">
								评论
							</h3>
						</div>
					</div>
				</div>
			</div>
			<!-- 商品介绍 -->
			<!-- 底部服务开始 -->
			<div id="service" style="border-top:1px solid #dcdcdc;padding-top:10px;">
				<div class="part">
					<h3>购物指南</h3>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>购物流程</a>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>会员介绍</a>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>生活旅行/团购</a>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>常见问题</a>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>大家电</a>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>联系客服</a>
				</div>
				<div class="part2">
					<h3>配送方式</h3>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>上门自提</a>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>211限时达</a>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>配送服务查询</a>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>配送费收取标准</a>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>海外配送</a>
				</div>
				<div class="part">
					<h3>支付方式</h3>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>货到付款</a>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>在线支付</a>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>分期付款</a>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>邮局汇款</a>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>公司转账</a>
				</div>
				<div class="part">
					<h3>售后服务</h3>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>售后政策</a>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>价格保护</a>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>退款说明</a>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>返修/退换货</a>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>取消订单</a>
				</div>
				<div class="part5">
					<h3>特色服务</h3>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>夺宝岛</a>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>DIY装机</a>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>延保服务</a>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>京东E卡</a>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>京东通信</a>
				</div>
				<div class="part6">
					<h3>京东自营覆盖区县</h3>
					<p>京东已向全国1978个区县提供自营配送服务，支持货到付款、OS机刷卡和售后上门服务。</p>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>查看详情 ></a>
				</div>
			</div>
			<!-- 底部服务结束 -->
			<!-- 底部索引开始 -->
			<div id="index">
				<p class="first">
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>关于我们</a>|
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>联系我们</a>|
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>商家入驻</a>|
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>营销中心</a>|
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>手机京东</a>|
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>友情链接</a>|
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>销售联盟</a>|
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>京东社区</a>|
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>京东公益</a>|
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>English Site</a>|
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>Contact Us</a>
				</p>
				<p class="second">
					<span>北京市公安局朝阳分局备案编号110105014669</span>|
					<span>京ICP证070359号</span>|
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>互联网药品信息服务资格证编号(京)-经营性-2014-0008</a>|
					<span>新出发京零 字第大120007号</span>
				</p>
				<p class="third">
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>音像制品经营许可证苏宿批005号</a>|
					<span>出版物经营许可证编号新出发(苏)批字第N-012号</span>|
					<span>互联网出版许可证编号新出网证(京)字150号</span>
				</p>
				<p class="fourth">
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>网络文化经营许可证京网文[2014]2148-348号  </a>
					<span>违法和不良信息举报电话：4006561155  Copyright © 2004-2015  京东JD.com 版权所有</span>
				</p>
				<p class="fifth">
					<span>京东旗下网站:</span>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>360TOP</a>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>拍拍网</a>
					<a href='<?php echo U('Home/Index/item',array('goods_id'=>17)) ?>'>网银在线</a>
				</p>
				<div class="img">
					<img src="images/v.png" height="32" width="103" alt="" />
					<img src="images/v1.png" height="32" width="103" alt="" />
					<img src="images/v3.png" height="32" width="103" alt="" />
					<img src="images/v4.png" height="32" width="103" alt="" />
					<img src="images/v7.png" height="32" width="185" alt="" />
					<img src="images/v5.jpg" height="32" width="103" alt="" />
				</div>
			</div>
			<!-- 底部索引结束 -->
		</body>
		</html>